<{include file="header.tpl"}>
<link href="<{$cssurl}>midp-grid.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="<{$jqurl}>jquery.validate.min.js"></script>
<script>
$().ready(function(){
	$("#id_form1").validate({
		rules: {
			"field[1][username]": "required",
			"field[1][password]": "required",
			"field[1][repassword]": {
				required: true,
				minlength: 6,
				equalTo: "#id_password"
			},
			"field[1][email]":"email"
		},
		messages: {
			"field[1][username]": "选择一个用户名",
			"field[1][password]": "输入密码",
			"field[1][repassword]": "必须与密码相同",
			"field[1][email]": "必须是邮箱地址格式"
		},
		errorPlacement: function(error, element) {
			element.addClass('error');
			//error.appendTo(element.parent().parent().next('.form_col_3'));
			element.parent().parent().next('.form_col_3').html(error);
			//alert(element.parent().parent().parent().html());
		},
		success: function(label){
			label.html('&nbsp;').removeClass('error').addClass('checked');
			//alert(label.parent().parent().html());
		}
	});
	//alert('loading ok');
});
</script>
<style type="text/css">
#form_1 label	{ display:block;}
</style>

<div>register</div>
<div style="width:500px; margin-left:auto; margin-right:auto;"><{$input}></div>
<{include file="footer.tpl"}>